﻿using System;
using System.Collections.Generic;
using System.Web;

/// <summary>
/// Summary description for Ticket
/// </summary>
public class Ticket
{
    private int _ID;
    public int ID
    {
        get { return _ID; }
        set { _ID = value; }
    }

    private string _userID;
    public string UserID
    {
        get { return _userID; }
        set { _userID = value; }
    }

    private List<TicketDetail> _ticketDetail;
    public List<TicketDetail> TicketDetail
    {
        get { return _ticketDetail; }
        set { _ticketDetail = value; }
    }

    private Flight _flight;
    public Flight Flight
    {
        get { return _flight; }
        set { _flight = value; }
    }

    private DateTime _boughtDay;
    public DateTime BoughtDay
    {
        get { return _boughtDay; }
        set { _boughtDay = value; }
    }

    private string _status;
    public string Status
    {
        get { return _status; }
        set { _status = value; }
    }

    public Ticket()
    {
        _ID = 0;
        _userID = "";
        _ticketDetail = new List<TicketDetail>();
        _flight = new Flight();
        _boughtDay = DateTime.Now;
        _status = "";
    }
}

public class TicketDetail
{
    private int _ID;
    public int ID
    {
        get { return _ID; }
        set { _ID = value; }
    }

    private Passenger _passenger;
    public Passenger Passenger
    {
        get { return _passenger; }
        set { _passenger = value; }
    }

    private string _seatClass;
    public string SeatClass
    {
        get { return _seatClass; }
        set { _seatClass = value; }
    }

    private int _price;
    public int Price
    {
        get { return _price; }
        set { _price = value; }
    }

    public TicketDetail()
    {
        _ID = 0;
        _passenger = new Passenger();
        _seatClass = "";
        _price = 0;
    }
}

public class Passenger
{
    private string _firstName;
    public string FirstName
    {
        get { return _firstName; }
        set { _firstName = value; }
    }
    private string _lastName;
    public string LastName
    {
        get { return _lastName; }
        set { _lastName = value; }
    }
    private int _age;
    public int Age
    {
        get { return _age; }
        set { _age = value; }
    }
    private bool _isMale;
    public bool IsMale
    {
        get { return _isMale; }
        set { _isMale = value; }
    }

    public Passenger()
    {
        _firstName = "";
        _lastName = "";
        _age = 0;
        _isMale = false;
    }
}